﻿using System;
using System.Collections;

namespace Genko.Common.Collections
{
	/// <summary>
	/// Provides the base functionality for creating collections
	/// </summary>
	public class HashListBase : ICollection
	{
		private HashList innerList;

		protected HashListBase()
		{
			this.innerList = new HashList();
		}

		public virtual int Count
		{
			get { return this.innerList.Count; }
		}

		public virtual Object SyncRoot
		{
			get { return this.innerList.SyncRoot; }
		}

		public virtual bool IsSynchronized
		{
			get { return this.innerList.IsSynchronized; }
		}

		protected virtual HashList InnerList
		{
			get { return this.innerList; }
		}

		public virtual IEnumerator GetEnumerator()
		{
			return this.innerList.GetEnumerator();
		}

		public virtual void CopyTo(Array array, int index)
		{
			this.innerList.CopyTo(array, index);
		}
	}
}
